home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1984 Half 1 / rerun-1984-01-06-side-b.d64 / dbase_3k feb p48 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  118 lines

  1. 1 t$="no name":print"[147]file name":inputt$:t$=left$(t$,14)
  2. 2 n=int(fre(0)/20):p=1:x=(n+1)/10:dims$(n):poke36879,185:r$=" line#":gosub81
  3. 3 f$=chr$(15):g$=chr$(8):goto8
  4. 4 k=0
  5. 5 q=0:print"[147][144]catalog: ";t$:print"page
  6. 6 [129]j[178]k[164]n:[139][198](s$(j))[178]18[167][153]"cmd"[181](j[173]10[170]1);s$(j):q[178]q[170]1:[139]q[177]10[167]8
  7. 7 [130]j
  8. 8 [141]26:[139]a[178]0[167]8
  9. 9 [145]a[137]4,12,19,22,29,36,41,67,47,52,31
  10. 10 [139]j[179]n[170]1[167]k[178]j:[137]5
  11. 11 [137]4
  12. 12 [153]"page#":[133]a$:p[178][197](a$):[141]27:[139]a[179][177]0[167]9
  13. 13 [139]p[179]1[176]p[177]x[167][153]"ononon":[137]12
  14. 14 [153]"loadpage"p;t$:[129]i[178]0[164]9:l[178](p[171]1)[172]10[170]i:[153]"cmd"l;s$(l):[130]
  15. 15 [141]26:[139]a[178]0[167]15
  16. 16 [139]a[179][177]12[167]9
  17. 17 p[178]p[170]1:[139]p[177]x[167]p[178]1
  18. 18 [137]14
  19. 19 a$[178]"-1":[153]"enter"r$:[133]a$:j[178][197](a$):[141]27:[139]a[179][177]0[167]9
  20. 20 [139]j[179]0[176]j[177][181](x)[172]10[170]1[167][153]"ononononon":[137]19
  21. 21 [133]s$(j):[137]116
  22. 22 a$[178]"-1":[153]"insert"r$:[133]a$:j[178][197](a$):[141]27:[139]a[179][177]0[167]9
  23. 23 [139]j[179]0[176]j[177][181](x)[172]10[170]1[167][153]"ononononon":[137]22
  24. 24 [153]"entry":[133]d$:[153]"inserting":[139]r[178]n[167]14
  25. 25 [141]86:[129]i[178]kk[164]j[170]1[169][171]1:s$(i)[178]s$(i[171]1):[130]:s$(j)[178]d$:[137]116
  26. 26 e$[178]"c,p,e,i,n,s,l,h,k,a,?wait ":[153]""e$"cmdonon":[141]63
  27. 27 a[178]0:[129]i[178]1[164]13:[139][202](e$,i[172]2[171]1,1)[178]a$[167]a[178]i:i[178]13
  28. 28 [130]i:[142]
  29. 29 [141]66:[139]a$[179][177]"y"[167]4
  30. 30 [153]"new file name":[133]t$:[141]81:[137]4
  31. 31 [153]"loadcwaitatalog":[153]"call pwaitage":[153]"iwaitnsert"r$
  32. 32 [153]"ewaitnter"r$:[153]"kwaitill"r$:[153]"awaitlphabetize
  33. 33 print"n[146]ew file":print"l[146]oad from tape or disc":print"s[146]ave to tape or disc"
  34. 34 print"?[146] definitions":print"h[146] list to printer[145]":gosub26:ifa=0then31
  35. 35 goto9
  36. 36 print"[147][144]save to tape or disc":gosub66:ifa$<>"y"then4
  37. 37 print"d[146]isc or t[146]ape?":gosub63:ifa$="t"then40
  38. 38 ifa$<>"d"then4
  39. 39 open15,8,15,"ui-":close15:open2,8,2,"@0:"+t$+" [216],s,w":j=2:goto89
  40. 40 open1,1,1,t$:print#1,t$:j=1:goto89
  41. 41 print"[147]load from tape or disc":gosub66:ifa$<>"y"then4
  42. 42 print"d[146]isc or t[146]ape?":gosub63:ifa$="t"then46
  43. 43 ifa$<>"d"then4
  44. 44 gosub97:print"file name?":inputn$:ifn$=""then4
  45. 45 open15,8,15,"ui-":close15:open2,8,2,"0:"+n$+" [216],s,r":j=2:goto93
  46. 46 open1,1,0:j=1:goto93
  47. 47 print"kill"r$:inputa$:j=val(a$):gosub27:ifa<>0then9
  48. 48 ifj<0orj>nthenprint"[145][145]":goto47
  49. 49 fori=jton-1:ifs$(i)="[192]"ands$(i+1)="[192]"theni=n-1:goto51
  50. 50 s$(i)=s$(i+1):gosub65
  51. 51 next:s$(n)="[192]":goto14
  52. 52 print"alphabetize  ";:gosub82:u=val(a$):ifu<0oru>nthengoto8
  53. 53 ifmid$(s$(u),1,1)=""thenu=u+1
  54. 54 gosub83:k=0:fori=utokk:ifleft$((s$(i)),1)=""thenk=1:nn=i-1:i=kk
  55. 55 nexti:ifk=1then57
  56. 56 nn=kk
  57. 57 i=0
  58. 58 j=u:ifi=nn-uthen14
  59. 59 ifj=nn-ithen62
  60. 60 ifs$(j)>s$(j+1)thentp$=s$(j):s$(j)=s$(j+1):s$(j+1)=tp$
  61. 61 j=j+1:goto59
  62. 62 i=i+1:poke36879,int(rnd(k)*8+184):goto58
  63. 63 geta$:ifa$=""then63
  64. 64 return
  65. 65 print""tab(37);i:return
  66. 66 print"are you sure? y/n":gosub63:return
  67. 67 print"[147]hard copy":gosub66:ifa$<>"y"then4
  68. 68 print"entire file?":gosub63:ifa$="y"thenf=0:m=n:goto71
  69. 69 gosub82:f=val(a$):iff<0orf>ngoto67
  70. 70 print"ending"r$:inputa$:m=val(a$):ifm<0orm>norm=<fthen67
  71. 71 open4,4:a$="":fori=1toint((40-len(t$))/2)
  72. 72 a$=a$+" ":nexti:a$=a$+"[146]":print#4,chr$(14)a$+t$+f$chr$(10)chr$(10)
  73. 73 ll=4:fori=ftom:ifleft$(s$(i),1)=""then76
  74. 74 ifs$(i)<>"[192]"thenprint#4,chr$(15)"     "s$(i)chr$(10):ll=ll+2
  75. 75 goto79
  76. 76 a$="":forkk=7tolen(s$(i))*6:a$=a$+chr$(255):nextkk
  77. 77 print#4,"     "g$+a$:print#4,f$+"     "+s$(i)+g$
  78. 78 print#4,f$+"     "+g$+a$+f$chr$(10):ll=ll+4
  79. 79 ifll>59thenfornl=llto72:print#4,chr$(10);:nextnl:print#4,"":ll=3
  80. 80 nexti:close4:goto4
  81. 81 forj=0ton:s$(j)="[192]":nextj:return
  82. 82 print"starting"r$:inputa$:return
  83. 83 fori=nto0step-1:ifs$(i)<>"[192]"thenkk=i:i=0:goto85
  84. 84 kk=i
  85. 85 nexti:return
  86. 86 fori=j+1ton:ifs$(i)="[192]"thenkk=i:i=n:goto85
  87. 87 kk=i
  88. 88 nexti:return
  89. 89 fori=nto0step-1:k=i:ifs$(i)<>"[192]"theni=0
  90. 90 nexti:k=k+1
  91. 91 print#j,t$+" [216]":print#j,k:fori=0tok
  92. 92 print#j,s$(i):gosub65:next:closej:goto4
  93. 93 input#j,n$:ifright$(n$,2)<>" [216]"thenprintn$" not found":gosub63:closej:goto4
  94. 94 t$=n$:t$=left$(t$,len(t$)-2):print"found "t$:input#j,k
  95. 95 ifk>nthenprint"warning:":print"file originated from  vic with larger memory":k=n
  96. 96 fori=0tok:input#j,s$(i):gosub65:next:closej:goto4
  97. 97 print"[147]disc file listing? ":gosub63:ifa$<>"y"thenreturn
  98. 98 print"[147]scanning disc"
  99. 99 open1,8,0,"$0"
  100. 100 get#1,a$,b$
  101. 101 get#1,a$,b$
  102. 102 get#1,a$,b$
  103. 103 c=0
  104. 104 if a$<>""thenc=asc(a$)
  105. 105 if b$<>""thenc=c+asc(b$)*256
  106. 106 d$=d$+""+mid$(str$(c),2)+"[146]"
  107. 107 get#1,b$:ifst<>0thenclose1:print:return
  108. 108 if b$<>chr$(34)then107
  109. 109 get#1,b$:if b$<>chr$(34)thend$=d$+b$:goto109
  110. 110 get#1,b$:ifb$=chr$(32)then110
  111. 111 c$=""
  112. 112 c$=c$+b$:get#1,b$:ifb$<>""then112
  113. 113 ifright$(d$,1)="[216]"thenprintd$
  114. 114 d$="":goto101
  115. 115 y=y-1:fori=0toc:c$(i,p%(l))="[192]":nexti:fori=ltoy:p%(i)=p%(i+1):nexti:l=l-1:return
  116. 116 ifleft$(s$(j),1)="_"thens$(j)=""+right$(s$(j),len(s$(j))-1)
  117. 117 goto14
  118.